﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace DualPlaneFR4Paster.Migrations.mysys
{
    public partial class testoutputdir : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "MPartNums",
                columns: table => new
                {
                    Id = table.Column<int>(type: "INTEGER", nullable: false)
                        .Annotation("Sqlite:Autoincrement", true),
                    PartNum = table.Column<string>(type: "TEXT", maxLength: 32, nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_MPartNums", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "MSystemParams",
                columns: table => new
                {
                    Id = table.Column<int>(type: "INTEGER", nullable: false)
                        .Annotation("Sqlite:Autoincrement", true),
                    Name = table.Column<string>(type: "TEXT", maxLength: 32, nullable: false),
                    Value = table.Column<string>(type: "TEXT", maxLength: 64, nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_MSystemParams", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "XYZRPoints",
                columns: table => new
                {
                    Id = table.Column<int>(type: "INTEGER", nullable: false)
                        .Annotation("Sqlite:Autoincrement", true),
                    Name = table.Column<string>(type: "TEXT", maxLength: 32, nullable: false),
                    Alias = table.Column<string>(type: "TEXT", maxLength: 64, nullable: true),
                    Floor = table.Column<int>(type: "INTEGER", nullable: false),
                    X = table.Column<double>(type: "REAL", nullable: false),
                    Y = table.Column<double>(type: "REAL", nullable: false),
                    Z = table.Column<double>(type: "REAL", nullable: false),
                    R = table.Column<double>(type: "REAL", nullable: false),
                    ZIndex = table.Column<int>(type: "INTEGER", nullable: false),
                    RIndex = table.Column<int>(type: "INTEGER", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_XYZRPoints", x => x.Id);
                });

            migrationBuilder.InsertData(
                table: "MPartNums",
                columns: new[] { "Id", "PartNum" },
                values: new object[] { 1, "F107045b0" });

            migrationBuilder.InsertData(
                table: "MPartNums",
                columns: new[] { "Id", "PartNum" },
                values: new object[] { 2, "F107318A1" });

            migrationBuilder.InsertData(
                table: "MSystemParams",
                columns: new[] { "Id", "Name", "Value" },
                values: new object[] { 1, "PartNum", "F107318A1" });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "MPartNums");

            migrationBuilder.DropTable(
                name: "MSystemParams");

            migrationBuilder.DropTable(
                name: "XYZRPoints");
        }
    }
}
